package aspectj.concert;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareParents;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

/**
 * 演示引入的切面
 */
@Component
@Aspect
@Profile("introduce")
public class EncoreableIntroducer {

    //在不修改原有类的前提下，为所有实现了Performance的bean添加新的接口实现
    @DeclareParents(value = "aspectj.concert.Performance+", defaultImpl = DefaultEncoreable.class)
    public static Encoreable encoreable;
}
